<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>{$current['title']}-{$Think.CONFIG.title}</title>

		<meta name="keywords" content="{$Think.CONFIG.keywords}" />
		<meta name="description" content="{$Think.CONFIG.description}" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

		<include file="Public/head" />
<!--// datatables的js-->
<link rel="stylesheet" type="text/css" href="__LILYCDN__/Public/lily/datatables/datatables.min.css"/>
<script type="text/javascript" src="__LILYCDN__/Public/lily/datatables/datatables.min.js"></script>
	
   </head>

	<body class="no-skin">
		<include file="Public/header" />
		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<include file="Public/sidebar" />
			<div class="main-content">
				<div class="main-content-inner">
					<!-- #section:basics/content.breadcrumbs -->
					<include file="Public/breadcrumbs" />

					<!-- /section:basics/content.breadcrumbs -->
					<div class="page-content">
						<include file="Public/set" />

						<!-- /section:settings.box -->
						<div class="row">
							<div class="col-xs-12">
    								<!-- PAGE CONTENT BEGINS -->
                                <!--     正文开始	1. 搜索  2. 代码-->							  
    							<div class="row">
    
    
    									<form class="form-inline" action="" method="get">
    									    	<div class="col-xs-5">
    									    <a class="btn btn-info" href="{:U(getcomstr('Ad').'/addedit')}?sheetname={$sheetname}&id={$val['id']}" value="">新增</a>
    										<input id="alldel" class="btn btn-info" type="button" value="删除">
                                            </div>    
                                            <div class="col-xs-4 col-xs-offset-1">
    										<input type="text" name="keyword" class="form-control" style="width:100%" placeholder="请输入拍摄对象" >
    										</div>
    										<div class="col-xs-2">
    										<button type="submit" class="btn btn-purple btn-sm">
    											<!--<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>-->
    											搜索
    										</button>
    										</div>
    									</form>
    								</div>
    							<h4 align="center"> {$sheetname}</h4>
    						    <div class="space-4"></div>
								<div class="table-responsive">
    									<form id="form" method="post" action="{:U('del')}">
    									<table class=" data table table-striped table-bordered">
    										<thead>
    										<tr>
        										<volist name="queryarr" id="val" offset="0" length='1'>
        												<td class="center">
        												</td>
        												<td class="center col-md-1 col-xs-1">
        												    <a href=
        												    "<?php echo U(getcomstr('Ad').'/addedit?id='.$val['id']); ?>"> </a><br>
        											    </td>
                                                        <volist name="val" id="val1" offset="1" length='9999'>
                                                            	<th class="center ">{$val1}</th>
                                                        </volist>
        										</volist>
    										</tr>
    										</thead>
    										
    										<tbody>
    							
    										<volist name="queryarr" id="val" offset="1" length='9999'>
    											<tr>
    												<td class="center">
    													<input class="uids"  type="checkbox" name="uids[]" value="{$val['id']}">
    												</td>
    												<td class="center col-md-1 col-xs-1">
    												    <a href=
    												    "<?php echo U(getcomstr('Ad').'/addedit?id='.$val['id']); ?>">修改</a><br>
    											    </td>
    
                                                    <volist name="val" id="val1" offset="1" length='9999'>
                                                        <td style="" class="center lilyth"><a href="<?php echo U(getcomstr('Vi').'/echoiddata?id='.$val['id']); ?>">{$val1}</a></td>
                                                    </volist>
     
    											</tr>
    										</volist>
    										</tbody>
    									</table>
    									</form>
    								</div>
    							   {$page} 
							</div><!-- /.col -->					
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div>
			</div><!-- /.main-content -->
			<include file="Public/footer" />
			
		</div><!-- /.main-container -->

		<include file="Public/footerjs" />
		<!-- inline scripts related to this page -->
		<script type="text/javascript">
		$(function(){

			$(".check-all").click(function(){
				$(".uids").prop("checked", this.checked);
			});
			$(".uids").click(function(){
				var option = $(".uids");
				option.each(function(i){
					if(!this.checked){
						$(".check-all").prop("checked", false);
						return false;
					}else{
						$(".check-all").prop("checked", true);
					}
				});
			});
			
			$("#alldel").click(function(){
				bootbox.confirm({
					title: "系统提示",
					message: "是否要删除所选？", 
					callback:function(result){
						if(result){
							$("#form").submit();
						}
					},
					buttons: {
					    "confirm" : {
								"label" : "确定",
								"className" : "btn-danger"
							},
						"cancel" : {"label" : "取消"}

					}
				});
			});
			$(".del").click(function(){
				var url = $(this).attr('val');
				bootbox.confirm({
					title: "系统提示",
					message: "是否要该用户?", 
					callback:function(result){
						if(result){
							window.location.href = url;
						}
					},
					buttons: {	
					    "cancel" : {"label" : "取消"},
						"confirm" : {
								"label" : "确定",
								"className" : "btn-danger"
							}
					
					}
				});
			});
			
			
		})
		</script>
		
<script>


//设置参数
setCommonOptions(".data")



// 设定datatable的一些参数
function setCommonOptions(tableclass){

     $(tableclass).DataTable({
    //  "lengthMenu": [50, 100,200,1000,9999],
           // 每页的初期件数 用户可以操作lengthMenu上的值覆盖
        "pageLength": 5,
        // "searching":false,    //去掉搜索框方法一
        // "bFilter":false,    //去掉搜索框方法二
        // "info":false,    //去掉底部的文字
        // "bSort":false,    //禁止排序
        "aaSorting": [],     //选项为空数组。它将禁用初始排序，同时仍然允许在单击列时进行手动排序。
        "oLanguage": { 
            "sLengthMenu": "每页显示 _MENU_ 条记录", 
            "sZeroRecords": "抱歉， 没有找到", 
            "sInfo": "从 _START_ 到 _END_ /共 _TOTAL_ 条数据", 
            "sInfoEmpty": "没有数据", 
            "sInfoFiltered": "(从 _MAX_ 条数据中检索)", 
            "sSearch":"表格内搜索",
            "oPaginate": { 
            "sFirst": "首页", 
            "sPrevious": "前一页", 
            "sNext": "后一页", 
            "sLast": "尾页"
            }, 
            "sZeroRecords": "没有检索到数据", 
            "sProcessing": "<img src='./loading.gif' />"
        },
        "bPaginate": false, //翻页功能 
        "bLengthChange": true, //改变每页显示数据数量 
        "bFilter": true, //过滤功能 
        "bInfo": false,//页脚信息 
        "bAutoWidth": true,//自动宽度
        'dom': 'Bfrtip',
      'buttons': [],

})
}
</script>    		
	</body>
</html>
